#include<bits/stdc++.h>
#define int long long
#define ls(x) ((x)*2)
#define rs(x) ((x)*2+1)
#define Debug(...) fprintf(stderr, __VA_ARGS__)
#define For(i,a,b) for(int i=a,i##end=b;i<=i##end;i++)
#define Rof(i,a,b) for(int i=a,i##end=b;i>=i##end;i--)
using namespace std;
const int N=1e6+5,Mod=998244353;
//typedef __int128_t i128;
//i128 _base=1;
//inline int mol(int x){return x-Mod*(_base*x>>64);}
//inline void Add(int &x,int y){x=mol(x+y+Mod);}
inline int read(){
	int f=0,x=0;
	char ch=getchar();
	while(!isdigit(ch)){f|=(ch=='-');ch=getchar();}
	while(isdigit(ch)){x=(x<<3)+(x<<1)+(ch^48);ch=getchar();}
	return f?-x:x;
}
char s[N];
char mp[105][105];
signed main(){
	//_base=(_base<<64)/Mod;
	freopen("snake.in","r",stdin);
	freopen("snake.out","w",stdout);
	// ios::sync_with_stdio(false);
	// cin.tie(0); cout.tie(0);
	scanf("%s",s+1);
	int n=strlen(s+1);
	cout<<100<<" "<<100<<endl;
	For(i,1,100) For(j,1,100) mp[i][j]='B';
	int p=0;
	For(i,1,100){
		if(i%2==1){
			For(j,1,100) if(p<n)mp[i][j]=s[++p];
		}
		else Rof(j,100,1) if(p<n)mp[i][j]=s[++p];
		if(p>=n) break;
	}
	For(i,1,100){
		For(j,1,100) cout<<mp[i][j];
		puts("");
	}
	cout<<1<<" "<<1<<endl;
	p=1;
	For(i,1,100){
		if(i%2==1){
			For(j,1,99)if((++p)<=n)cout<<"R";
		}
		else Rof(j,99,1) if((++p)<=n)cout<<"L";
		if(p>=n) break;
		cout<<"D";p++;
	}
#ifdef LOCAL
    Debug("\nMy Time: %.3lfms\n", (double)clock() / CLOCKS_PER_SEC);
#endif
	return 0;
}
